minor code/comment improvements
fix typos; spelling