brought over some daemon related tools
greatly simplified and refactored the config parsing and log setup routines