I have John and Helen Miller (ms also Miller) who had daughter Elizabeth about 1811. Census gives her birthplace as Glasgow. Elizabeth married John Tolmie in Auchinleck around 1830 and family lived in Auchinleck. Links with Sorn I have established are; 1. Elizabeth Miller Tolmie died at Stewart Place, Catrine, 31st July 1877.
2. Her daughter was named Mary Shaw Tolmie. She died at Sorn in 1866 aged 17.
3. Elizabeth's daughter Margaret married Robert McAlpine at Catrine Sorn 8th June 1866. Her address was Catrine, his was Riccarton. Roberts parents were Robert McAlpine and Janet Reid.
Do you see any connection with your lines. I feel sure that the name Mary Shaw points to some connection.