In 1809, Walter Coffin sunk the first coal pit in the Rhondda, further up the valley in Dinas, but a lack of a transportation network greatly affected the profitability of coal mining as an industry in the region. Coffin tackled this problem by constructing a one-mile tramline which connected his mines in Dinas to a tramline built by Dr. Richard Griffiths at Denia (Pontypridd), which linked to a private canal that joined onto the Glamorganshire Canal at Treforest. Coffins tramline followed the southern bank of the River Rhondda and ran through Porth. The existence of the tramline made the development of the Porth and Cymmer region far more attractive, and by the middle of the 19th century there was an impetus to expand coal mining in the area. In 1841 Richard Lewis joined Coffin in trying to exploit the region with his level built at Cymmer. This resulted in the construction of around fifty miners' cottages, several of which were located in Porth. In 1844 Lewis Edwards of Newport and George Gethin of Penygraig opened a small level at Nyth-bran on the eastern borders of Porth, the villages' first coal mine. This was followed in 1845 by the sinking of the Porth Colliery by David James of Merthyr, the success of which saw him build the Llwyncelyn Colliery in 1851, also in Porth. By 1850 the Taff Vale Railway had been extended to Cymmer replacing the tramline, allowing direct access between the lower Rhondda and the ports of Cardiff.