most daemon code done
Continued daemon mode implementation
Continued daemon mode implementation