Slot abstraction: some small SQL fixes

Things are generally working.  A bit more testing, then this may be
ready.