Cleanup template.
Cleanup and write unit test for the directive.