in 1844 the railways act was passed , but what did it do ?