Implemented full REST functionality.

Implemented the REST functionality with dummy files in /rest. The
rest.js is yet to be optimized but fully functional. The dummy files in
/rest may be removed as soon the server supports REST.