Tidy up standard includes in main.cpp:
- put them in the file where they are needed
- use C++ headers <cblah> instead of C <blah.h>