added templating via AngularJS directives