Correct content type for payloads of requests that go through Restful instances.
Some comment polish, and get rid of debug line exposing global variable.