More work on the main UI