fixed a few typos and removed some trailing whitespaces