Added sorting functions for people and topics page