Take just the improved testing code from codex/implement-feature-from-issue-#291 and add it intelligently over the current HEAD of master