Renamed a few variables for clarity.