Re-worked api to be more RESTful