Upgrading wastewater treatment plants