Add some global declaration and initialization code