Fix typo and rename arguments and variables for better understanding.