Cleanup of editing events, fixes #6.