Made some changes to the UI, and cleaned some of the code