Fixed some typos and stripped trailing whitespaces