Plug flow wastewater treatment