src: reshuffle structs
cli: speed up stdout writes by using writebuf