Code refactorings