included commenting and removed unused variables.