Waste treatment and recovery