Pleasing the DOM

* Refactor DOM manipulation out of controllers and into directives,
    improving performance and conforming with the Angular Way.
* AngularJS 1.3.8.