fixed a bunch of typos and errors