Some CSS and JS tweaks to tidy up the code