Now saves the folders, changed name from tempdatabase to memorydatabase