Added predicate and type matching, and renamed to follow C# conventions