More debug logging and some BCE changes