fix various typos and other bits (from Ian Kinner)