Fixed CSV export to include all fields. Used some introspection to get field names. Added type inheritance field.