Removal of unused variables from list.