Add tests and fix bug in orClause, andClause.