Metallurgy code cleanup

Removed copypaste code by iterating over a list.