gallery/gallery views refactored

#1108