Refactored the UI to make future changes to it easier.