Make daemon class more flexible