Long waited refactoring, encapsulated API calls