Set needed global variables.