Improved comment sorting algorithm. It probably still has some room for improvements. The weights are probably not quite right, either.