Replaced datacodes.length with editing.length