Fixed #40 -- Added support for custom fields.

Thanks to Sergiy Kuzmenko for the initial patch.