Adds a logger and some small fixes
Merge branch 'master' into gh-pages