Synced to viewer code.
Tweaked the UI for sorting.