Small frontend refactoring