Use eventHandlers to register event handlers. This prevents issues with other modules that define templating functions.
More cleanups.
Remove custom controller class. This solution allows other modules to modify the controller class.