More frontend refactoring