Address angular's deprecations.

I made the switch from controllers to components, and moved some of the
code around in the file tree.