Order by bug fixed.
Bugs fixed and examples added.
Merge origin/master