Sort function, sensible defaults, equality fixes, examples

Closes #42. Thanks to @berndmeyer for making the examples.