Improved handling of floats
Various jshint fixes