cleaned up the UI and code a little