Fixed path smoothing and added some documentation