Renamed some variables for clarity.