Moved all AngularJS stuff into it's own class file.