Mandragore gallery core functions. Used for storage, user and media management.