Refactoring: variables and parameters renamed; comments added.