Between 1851 and 1854 the Eastern Counties Railway under the chairmanship of David Waddington had negotiated arrangements to work most of the other railways in East Anglia resulting in a network of lines totalling 565 miles .