Refactors custom fields export. refs #25