Improve parsing for output