More suitable use of path.join
More minor refactoring
Now sampling the course to reduce the number of points