Merge pull request #94 from riccardo/logging-refactoring

Logging refactoring