[Code] Bootloader improvements and fixes.