There are fluxes that will clean up your gold and it is possible raise it up to 999. (I doubt 4 nines) A description from Hank Chapman's excellent book "How to smelt your gold and silver" This flux will take small amounts of copper and iron and silver and trap them in the flux. The secret sauce is Manganese dioxide. This is the formula from Chapman. (Hint..... buy the book!)I just wanted to add that there are a few Youtube videos which claim the addition of fluxes, will be the final step in converting impure Gold, into pure .9999 Gold.
6 parts soda ash
1 part anhydrous borax
2 parts silica
2 parts manganese dioxide
optionally if it needs thinning one part Lime fluorspar mix 50/50
This is a modification of the US Mint original flux for gold. As the story goes, back in the day the US Mint was the only mint that could clean up its gold from mining to 999. That was because, unknown to them, the original formula had a contamination of manganese dioxide in it and they discovered it's ability to clean up the gold. The formula has evolved to what is listed above.
I kid you not, Chapman's book is an easy to read common English book that is easy to understand and he goes through all of the safety procedures completely. It is available from Legend