Clean up frontend

* Apply consistent indentation.
* Format files.
* Remove dead code.
* Delete unused files.