Made core easier to rewrite from external files.