Organized the client code a bit.
Changed the pathfinding algorithm to use an adjacency list.