Use new iteration methods with the events lib

events where left not updated with #60. This updates the events lib code to use new iteration method and fixes dom#on and dom#off