Schema and template tweaks and cleanups