387.13 Partial refactoring of hardware reset and bootloader commands