Okay, updated with the code that keeps the channels in the same order as before when deleting a channel in the middle of the list.