Issue #5 - Modified to use primitive types when field is required, and wrapper class when not required.