what are byproducts of producing metals through mining