Adding sort and search functionalities to scaffolds