Added support for non-mandatory fields. Fixes issue #13.