Added unit tests for eventable objects and fixed bu in on method, closes #1.