front-end refactoring