Refactorings to make it easier to understand the code