Refactoring of code
Merge branch 'master' into gh-pages