Clean-up to prepare for switching to a recursive descent parser.