Adding minor refactorings