Changed RESTful API spec. Updated examples. Added more rationale.

- Updated Guidelines
- Added more rationale for design decisions
- Made the RESTful API more flexible
- Various improvements