Refactoring frontend: template, JS & CSS