I teach them four line expectations:
1. Laser-straight: the tiles on the floor help a lot, but we also have lines painted on our sidewalks. They know, because I remind them often, to make sure their left foot is on the line.
2. Dead quiet: I never allow any talking in my line. Not even to me.
3. Arms crossed: I used to allow kids to choose whether they crossed their arms or put their hands in their pockets, but I found that if you give an inch, they take a light-year. So, arms crossed only.
4. Faces forward: It's really irritating to me when people standing in line at theme parks aren't paying attention when the line moves forward, leaving a huge gap. I don't want my line to have gaps in it either.
I teach these four expectations, and slowly wean them off me reminding them of each one when we line up, and settle for the aforementioned "LINE CHECK!" They repeat "LINE CHECK!" and instantly snap to attention in a perfect, orderly, OCD-tickling line (tears of joy!). The key is consistency and unbending, unwavering expectation of perfection. As long as it's not perfect, we don't move. If we're already moving and it stops being perfect (arms swing out, someone talks, someone veers way out of line), I call "FREEZE!" and everyone stops. I say "LINE CHECK!", they respond appropriately, then we're on our way.
All of that sounds terribly militaristic, but the whole time I've got this "Gosh, isn't this fun?" maniacal grin on my face, and I'm constantly praising the ones who've got it right and encouraging the ones who don't. We've only been in school for a week, and my kids are trained. They know exactly what I want, and I get it...and they're as proud of themselves as I am of them, because they know they've got it together, and they're the best-behaved class in 5th grade.