Fixed event type/namespace ordering and condensed event handling and used switch/case where possible to boost performance.
Merge pull request #3058 from pjackson28/fixeventnamespacing

Fixed event type/namespace ordering, condensed event handling and used switch/case where possible to boost performance.