moved some variables to level_resources.