Moves the controller name to a class function.
Adds more debugging information.