Fixed problem with sortable author table.

Also, some refactoring.