Update remove function.