Implement search and pagination.