Fixed some typos and big-ass functions.