Make kernel bootstrapping more modular