Code refactoring into OOP design.