Fixes, optimisations, and HTML minification