Generate the remove list and idlist for editing