Rewrote all the controllers in order to support dependency injection when minified.