Moved main execution to System class.

Moved all the garbage from Main.cpp into System.cpp and split it up into
multiple functions. Main now only calls system.execute() to run the
program.