Making this code less bad.... fixing some CB errors