Added a (more) externalisable implementation of A*