Fixed some JSHint problems, e.g. tabs to spaces, white space and adding 0 to .5 etc. and fixed spelling mistakes.