Tweaks to parsing to improve output