More fixes

As the name says, a bunch of fixes. The first one is important as something broke the speed display (my guess is it was my attempts to make jshint happy)