cleanup core/parser.py