Minor rearrangement in order of functions