Add factory for fields.