Added Daemon code back in