Refactoring, making code clearer