improve indentation and semicolons of generated code