Tidy up main.cpp
Start work on linux build