Logging refactoring (#89).