BG/CF - Fix compile & some Improvements