completely rewrite the parser/writer so that we don't do inline editing but write the whole file at once, incomplete