fix typos, add comments