Logger is added, refactoring