Updated output variable names

and added comments