Total rewrite.