Small refactoring and starts writing the parser.