Just a few refactorings