Just to complete David's stay in Scotland, here they are in 1881:
160 High Street, Castle Douglas
869 ED 2 Household No.42
Isabella Williamson, 36, Laundress, b.New Abbey
David, 12, scholar, b. Castle Douglas
Uncle/brother John:
7 Glen Road, Buittle
859 ED 2 Household No. 59
a boarder in with William Halliday:
John Williamson, 25, Engine(stationary) driver, b. Kelton
I wonder if this was an influence on David's future career?
No real sighting of Thomas

Gadget