validation working...
TODO - restore ordered dicts for environment and directives.