Refactored to move the path generating algorithm to be a fuction of a mesh.
Paths between points being drawn again.
Removed duplicate code