many edge case fixes in the path and line tracking, still not happy with it but it works