Refactoring server side for GalleryService have been finished.