Implemented several daemon fixes and improvements based on live tests.