 In 1833 Cockenzie Harbour was substantially reconstructed by the civil engineer Robert Stevenson.At about this time the waggonway was extended southwards to coal pits at Windygoul.In 1844 the North British Railway was authorised to build its main line from Edinburgh to Berwick.