@tacaswell,  my first reaction probably would be like yours, but looking farther down in the code, I think that using these local functions is actually the cleanest way to encapsulate the axis flip.