Refactoring; simplification