Half way through rewrite