Finished off TemplateHarness and MockFunction, and added tests