Major overhaul

That PR I mentioned a while ago is done.  All specs pass.  I believe same API, with additional options.