Added constants, functions and structs for the updated Daemon code, as well as the updated Daemon code itself.