Modified some comments, renamed some variables.