Electronic Structure of CO and BF