Sort function, sensible defaults, equality fixes, examples

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