Basic daemon functionality, config and cache handling (incomplete)