- `write` no longer uses hardcoded field definitions, but the ones from the definition file instead
- added generic write algo, which can be derived for other output implementors