code redesign first step

- Added default functions for not allowed and not implemented methods
- Changed function names to reflect target resource
- Changed routing to reflect resource and more RESTful design.  
- Reorganised functions according to the resource they refer to.

TODO:

+ Add authentication to modification functions
+ Break code into packages
+ Apply design pattern