bcon: remove global extern data, use functions.