Minor code reshuffle