Re-organize the API