what are the byproducts of mining metals