Fixing to use req.app to emit events rather than passig down an event handler from the appcore. Looks much cleaner now