Improved version of the daemon