Added insert operation to Image REST API.
Misc fixes