Split main.cpp into main.h and main.cpp