sentences:  Railway building began at Derby Works in 1840, when the North Midland Railway, the Midland Counties Railway and the Birmingham and Derby Railway set up engine sheds as part of their Tri Junct Station.When the three merged in 1844 to form the Midland Railway its first Locomotive and Carriage Superintendent Matthew Kirtley set out to organise their activities and persuaded the directors to build their own rolling stock, rather than buying it in (see Derby Works).By the 1860s the works had expanded to such an extent that he was considering reorganising it and, in 1873, it separated into the Midland Railway Locomotive Works, known locally as "The Loco", and a new Carriage and Wagon Works further south, off Litchurch Lane, locally known as the "Carriage and Wagon".