Misc improvements & tests.
Templates can now use multiple configurations of treasure piles.