Refactoring, logging