Move most of the ui code into the html/js
Add colouring to error messages