A few tweaks to the recent sort code

* Made links easier to click by adding padding.
* A few JS cleanups.