Major internal refactoring.

Removed a ton of baggage with resolving controller dependencies.
Moved some view and controller code out of the Router.