This version works with webdis!
A* in the browser. It works!
refactor code; pull out variables; general cleanup