Introduce object-oriented API