Started cleaning up the code that records path segments, I have it working now I need to make it better.