Updated the detection and messaging algorithms to send fewer, but smarter updates

Primarily work was done in the third example. Changes may need to be also made in the 1st and 2nd example soon.