Made loops pass jshint