[front-end] various small refactorings