Bug Fix

Changes to make the script correctly:
- Include all the relevant points into building the spline
-Correctly handle the cases of unrooted points (-1 case)