some schema tweaks
new util function to get collection keys, and test
include collection keys in template