If object has an id use it as the id of the saved value in elasticsearch...

This allows the object.id to override the _id of the object in elasticsearch.


I also did the "timestamp" in a slightly different way than the rest of the file as I feel it is cleaner. (If we approve this way, I will make another request to clean up all the other "style").