Tidy up the html and add some js to make the errors prettier