Implemented the ability to derive a template from a parse tree.
Merge pull request #68 from salspaugh/templates

Implemented the ability to derive a template from a parse tree.