SourceMain.cpp tidy up