types+grammar: minor tweaks to add clarity, format code