You forgot another usage of the word "vaya" , we also use it for two other things.
1) We use is as an expression or interjection, similar to"Wow, "Oh well!" or " Oh my!"..."Oh vaya!!" for example,:
Oh vaya! No esperaba ese final en la pelicula...Wow! i didnt expected that movie to end that way!
2) This other form of use is a bit more complicated for me to try to explain and i dont know if they use it outside of Mexico, but basically we use it with a little bit of a sarcastic tone, i will hope the examples explain the matter better than me haha
Vaya! crei que nunca ibas a llegar (with an angry/sarcastic tone, when someone is late for some appoinment) Oh Well, i tought you'd never come!
Similar to , "Oh, look who's here?" (with a sarcastic tone)!
Anyway, most of the time vaya is the imperative and formal way to say GO, as when you say "Vaya con Dios" (I've heard this expression more with americans that with actual latinos haha)
oh! and by the way! do not confuse it with VALLA, or BAYA. The first one is the name we have for those obstacles they use in the olympics on the running track. And BAYA is a fruit , a berry to be more precise.
Saludos desde Baja California, Mexico~!