how does gold refinery work