Implemented createEvent and fixed a bug
Added tests for the DOM events