additions to template building system, based on mrbob, the builder