Daemon

Implements what we need for #7