OOP refactoring