Optimise the template file

* Remove white spaces so that the generated file doesn't have any
* Miscellaneous CSS fixes and linting