minor tweaks in parser.py
style fixes in unit tests