prevent browser to show error when using decimals
improve code using for cycle
improve style
Merge branch 'master' into gh-pages