Cleaned up some of the UI functionality