Cleaned up a lot of the code and modified the GUI to be more modular