Backport of improvements from a project employing the Stock