Added CMainGallery class and declarations of some functions.