Fixed bug regarding list not immediately refreshing after sorting
Changed variable names in sort and picturesort