Altered the variable names and added comments.