I was thinking that at this level each element should be of the form K(x). I have planned a similar scheme based on regular expressions for the above levels. Basically, the plan is at the above levels, it will look at an element k, select a best domain for it by regexp, K, and make it K(x) and pass it to lower levels where it will perform this operation.