Reworked table sort function.
Merge remote-tracking branch 'upstream/master'

Conflicts:
	lib/page/main.js