initialized gallery controller and starting pages