Refactor the diff-parser to be a state machine to allow me to fix