Implemented more daemon functionality.