Refactor boot process.