fix some typos and minor cleanup