corrected spelling errors in variable names and comments