Sorting & some fixes.