squashed some bugs, created some new ones.  Ugh.  Approaching 100% test pass rate

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>