First major commit of the front-end refactoring