Refactor DependencyMap and Dependencies into structs
#12761
Merged
DependencyMap and Dependencies into structs
#12761