Refactored some of the UI