Cleaned up i and j counter variables, and gave them more meaningful names.