moved more code from bootstrapper into core