big frontend refactoring