Moved the logic that sets application variables.