refactoring daemon / In progress