Lots of changes.

Many, many changes to core.