Initial checkin of discriminative ibr code.