Use PUT instead of POST for storing documents.
Remove unused code.