Modularize the code base and implement part of the Parser.