Added addSingletonGetter() and updated EventHandler to use it.
Added a singletonGetter to StateHandler
Defined internal event and state handlers