Reorganized the code in the parser and cleaned the commented parts