Improve the way we handle the various parsing "states". Until now