Shared memory refactorying.