Complex sentence: Carstairs is located east of the county town of Lanark and the West Coast Mainline runs through the village which the village is served by Carstairs railway station.
Split into simpler sentences: Carstairs is located east of the county town of Lanark and the West Coast Mainline runs through the village. The village is served by Carstairs railway station.