cleaned up parser.py