Complex sentence: Shipping trade using the pier declined as Leith and Newhaven harbours were improved; in 1838 a new harbour was opened at Granton after which traffic continued but at a much reduced rate.
Split into simpler sentences: Shipping trade using the pier declined as Leith and Newhaven harbours were improved. In 1838 a new harbour was opened at Granton after which traffic continued but at a much-reduced rate.