Refactoring for wrapper API class