Agricultural wastewater treatment