added comments to the file and renamed some variables so they more accurately reflect their purpose in the program.
removed math.h dependency that hasn't been necessary since changing the heuristic