Sorting mongo arrays now is done client side.
Minor fixes.