More 3d code updates