Implemented initial daemon task support.

All 140 tests pass.