miscellaneous updates to core files, misc fixes, comments