Lots of core rewrites