clean up initialization code