Corrected JSHint errors and removed commented code