BUG:  Fixed error in checking truthiness vis-a-vis arrays.
REF:  Finishing refactor.  Updated tests and a bit of cleaning.