Changed the flow of the daemon controller