Reordered some initialization code.