squashed commits for #1255 to change delete() to a move operation