Web service rewriting

Tuned the web service to REST based.