Renaming variables for clarity.

There's a logic error here but for some reason I don't quite see it.