Added sorting and paging.