refactored the daemon to use CouchDB config instead of file-based config