Revert "AngularJS rewrite"

This reverts commit e7b0728fc40ae177df4dd8ee47caeee2877a8d86.