fix typos and clean up formatting