Further refactorings of boot.js