New event routing subsystem

Resolve #56.