Changed HashMaps to LinkedHashMaps to ensure the ordering of diagram
features was kept intact (because it drives the z-order in the diagram)