Updates to rewrite branch