Refactored some code and started the implementation of the parser.