Couchbase code tidy, nicer way to define sensors, and prevent NPE's, using new `Functionals`

addresses comments in #1473
Nice! Must make a mental note of this...