More work on parser refactor