Big updates to several core files to make them smell better.