Cleaning up share memory loading logic.