Various cleanups from coreinit