Shuffled some code around.