Added daemon process & Fixed some bugs