Bunch of refactorings