Cleaning up event routing just a little bit.
Merging with master.
Merging with master.