Replaced custom query mini-language with a predicate function.
Modified the component-type function to work with instances as well as types.