Sort like a god

Adds a second sort to search and browse list, and (attempts to add) several fixes and nice distinctions to the existing sort logic.

I'm not 100% sure this is ready for prime time so please merge cautiously.