Added comments and changed variable name.