Refactored gui to make it easier to change