Complex sentence: When the Highland Railway was created in 18xx it acquired the locomotives of its constituent companies, nearly all of which had been built under the supervision of William Barclay.
Split into simpler sentences: When the Highland Railway was created in 18xx it acquired the locomotives of its constituent companies. Nearly all of these had been built under the supervisor of William Barclay.