Implemented basic daemon functionality