wip: convert formats to use typed abstract classes