Refactoring Routes and making it RESTful