merging daemon.cpp/h into hpp