Added toString() to memory class