Fix Elasticsearch and Urlfetch

Switch to primitive<T>. I hope, I did it in the right way.