Some cleanup for detect_surfaces_type()