Commenting and Name Changes

Added commenting to improve code readability and changed the name of
function arguments to better reflect what they are in code.