Yeah, all but a few commands put into a routine are loaded at the top, but you'll notice a couple of horizontal bars for each item on the right hand side (like an = sign). You can 'grab' that and drag the item to anywhere you want in the sequence of the routine. 'Wait' commands are amongst the few loaded at the bottom, but they can still be re-positioned.
By using that, you can set the order of events in your routine to your satisfaction.