Fixed typos and simplified some lines.