Big fixes to make RESTful