Add closing brackets and reindent