Patriot agrees to huge selenium cleanup