Working OOP non-ML code