Fixed stuff as suggested by jshint