Rearrangement of code, no functional changes