The corporate authorities of each municipality may provide for the cleansing and purification of waters, watercourses, and canals, and, when necessary to prevent or abate a nuisance, may provide for the drainage and filling of ponds on private property.