Directive abstracted and tests made more robust
Some mild renaming
Build the templates and require them as a module