Many fixes to use cache proxy, and changes