reapply https://github.com/dimagi/Vellum/pull/220
extract parseDataElement() closure and add to plugin interface
formatting
remove unnecessary indirection/duplication