Added basic functions to the Mgallery