[enh] Logging in daemon + slight class refactoring