Moving domain form to an AngularJS directive
Fix template scope problem

Resolves #62