Changed a few variable names for clarity.