Added A* algorithm and random stuff