Refactoring API for ease of use