Fix typos in comments, and delete an unused function.