Fixed some variable names and comments