Switch tabs to spaces, fix jshint errors