refactoring engine's OOP system.