Improved delete for Chrome

Some refactoring to onNodeChange.