Renamed API and refactored bunch.