Core rewrite