Cleaned up some initialization code.