fix some typos, clarify comments and drop dead code (trivial)