Cleaned up merge-stuff in shape and test_shape.