Rewrite algorithm to use cell_pair instead of astar_path

* Basic algorithm now uses less memory to keep track of potential paths
* TODO: refactor