Added TemplateBase with basic write functionality + tests.