More refactorings. Especially to the token-based parser