Frontend refactoring