Some front-end refactors