refactoring of front-end codebase