Optimising wastewater handling and saving money