some frontend refactoring