Reorg daemon files to get around circular imports