Shuffled some code around.

Legal disclaimers.