Tab fix
Fix to init_lengths. Removed need for end points in pre_graph.
Changed inputs to pre_graph.
Revert "Changed inputs to pre_graph."

This reverts commit 50db0839e80ffe4d36a3c23743272b4966a297f3.
Revert "Revert "Changed inputs to pre_graph.""

This reverts commit 3a148ddf5c2a45ead8f9d7aed01a75f483c0e54d.
Revert "Fix to init_lengths. Removed need for end points in pre_graph."

This reverts commit 448bc63829f6b944195bc7dcbe34c40468aa9b26.
Actual fixes to init_lengths and pre_graph.