move more UI stuff into a class