Strip down the html and css to absolute essentials
Reformat JS according to Google's guidelines

Also added code to set random colors for elements.
Handle repetitive error checks using a common func

Also uses @roberthbailey’s stripped down code for reading env vars