Merge from schmunzel/RewriteOldCore