cep query tests pass and minor changes