A ground up rewrite