what are all the by products of producing metals through mining