fixed issue with javascript floating point maths ... dumb.  Also fixed
some spelling issues