refreshed jsdocs
Added the on() method. This is used to handle messages from dispatch().
Rewrote transitions to work with on().
Improved tests. added nested tests.
removed unused var. updated docs