Minor code shuffling