Porting to OOP class based