Complex sentence: A branch railway opened in 1876 and a lighthouse commissioned in 1878 but the railway was decommissioned in 1879 ending Moeraki's existence as a port.
Split into simpler sentences: A branch railway was opened in 1876 and a lighthouse first lit in 1878. However the railway was decommissioned in 1879 which ended Moeraki's existence as a port.