Rearrange code in plate_stack_viewGL2.c