Add sort and search

Added sorting and searching