COSMIT flat > nested / avoid duplicate validation

Also, PEP8