Big old rewrite.