Fixed #1, added a event.stopImmediatePropagation(); to stop implicitly firing the event mulitple times. Added some more comments.