Changed to directory structure and dictionary comparisons.