Daemon: small refactor