Minor cleanup to the core.

Just a few tiny minor cleanups.