Moved initialization code.