Clean up front-end code a bit. Deleted unused files, added some comments for clarification.