First implementation of new output format
work in progress