Refactoring API object