OOP restructuring, make language more functional