Added in the attempted path smoothing code as comments.