refactored the routes using REST, many more updates