Memory class and tests added