Add in initial Gui system, and a lot of code cleanup.