Move any state() or poll() through the runCommand - so it can then dispatch to proper events.  Create new events to have desktop notifications for build failures, stock notices and SmartThings presence changes.  Lots of little cleanup.