Add support for validation of nonscalar complex object ( arrays).

+ misc cleanup