Changed sorting algorithm

Now using internal sorter.
Implemented a tab view.

Requires some CSS love, but I'm not the man for the job.