simplify and improve parsing and rendering of parens and commas