Found a solution to the direction problem, once we generate the commands to move to the next node we iterate through that list and get the final facing