New validator

This still needs some comments and tests but the basic structure is there. Tear it up.
in other branches you use `c, ok := findElem(c)` - do it consistently?