Implement most of the UI