Adds support to define custom field generators

Fixes #90.