Added field type detection.