Merging change from @kgn's branch.
Work on multiple surveys, survey caching, etc.