Extract gallery controller.