Fixed some spelling errors in the function names and comments