Modified the api to be more api-like