move some more view code into the UI class