Initial commit of rewrite