It shall be the duty of the city or Mayor to direct all traffic in conformance with this traffic code and to enforce the traffic regulations as set forth in this traffic code, to make arrest for traffic violations, to investigate accidents and to cooperate with other officers of the city in the administration of the traffic laws, and in developing ways and means to improve traffic conditions.