Fix typos and spelling

Replacement for #2627, rebased on dev branch.

Closes #2627