Core fixes.
More core edits