what are the byproducts of producing gold