Complex sentence: The Class 5E1 served in goods and passenger workings on all 3 kV DC electrified mainlines country-wide for about forty years, but by the turn of the millennium the Series 4 locomotives were all retired and scrapped.
Split into simpler sentences: The Class 5E1 served in goods and passenger workings on all 3 kV DC electrified mainlines country-wide for about forty years. By the turn of the millennium, the Series 4 locomotives were all retired and scrapped.