Changed all of the i's to activityNode->taskNumber

In order to be consistent with getNextActivity funciton, I've changed
all the references to the task number away from utilizing i.

Program runs again, so that's a good sign.