Cleaned up all of the repetitive code and converted GUI to new layout