Fixing some stuff jshint was moaning about