Primary treatment of wastewater