Added support for excluding optional fields.