Moved everything in gui.cpp main() to main.cpp