Wastewaters and industrial residues