Rewriting Core from scrath