Moved code to testRemove and TestInsert functions