Generalized the use of the Query Expression Pattern.