Split main.cpp into main.cpp, init.cpp, and sim.cpp - some refactoring still needs to be done