Updating remove and insert process to upate items array both before and after altering the dom