Sorting out variables