Sorting and multi-gallery