Refactor type and field names