Refactoring, using OOP style