Refactor Puppet.Daemon