PWELogger big refactoring