Basic OO refactoring