Externalize path finding algorithm

Put path finding module in the library folder
for issue #1