refactored multiboot code