Progress on BIC score.  Refactored CPDQuery