We can allow passing in the memory instance instead of directly going for the global system instance.