Added comments and changed variable names