First basic refactorings.