The railways were separate , the S&D being administered by the Midland Railway and the London and South Western Railway companies and the North Somerset being run by and then owned by the Great Western Railway .