Continue simplifying the parsing code.
More cleanup and refactoring.