Cleanup of daemon code.  Initial init.d script, not hooked into CMake yet.