added model, collection for gallery, sort bug fix