A* pathfinder (with visualization) in Javascript