Added pagination and search functionality