John Ainslie, Edinburgh & Leith, 1804