API refactored.