Add additional tests for direction whitelist.
Start to improve sorting.

Add sort links to paginated lists. This will require updates to
pagination links as well.
Fix sorting + icons.
More fixes to pagination.

Fixes #27