I finally get the regression test working, just in time to rewrite the entire thing