Move last 2 API functions to classes and create wrappers