Divide code into several files

This is mainly discussed in these threads:

especially the first one is quite long and contains multiple references to other C++ tutorials.