Fix variable quoting issue, some grammar, and whitespace issues.