removed unused variables, run through JSHint