[WIP] Stash support

_Depends on #266._

Bringing #198 up to date and fixing up review notes.