Directions generating, stopping to move logic to client side