Some changes to variable names to improve understanding.