Reorganizing list of variables