Complex sentence: The Midland Railway and the Great Northern Railway (Great Britain) were the shareholders in the joint railway, the GNR looked after the track and buildings while the MR sorted locomotives and rolling stock.
Split into simpler sentences: The Midland Railway and the Great Northern Railway were the shareholders in the joint railway. The GNR looked after the track and buildings, while the MR sorted locomotives and rolling stock.