Daemon refactor 3