add paging for galleries index page (needs styling); some refactoring of gallery detail view in paging