Updated to allow processing HTML templates ala ng-boilerplate.
Removed unused code and most jshint errors.