Added assignment functions for Memory class