bug fixes to generator, initial converter code