Daemon script fixes and other minor adjustments