Stop emitting events after close
Made javascripts file jshint compliant
Fixed safe write test by changing order of actions (not the nicest approach, changing a test)
Updated version