restructured the ui classes a bit