Changed some hardcoded window variables to point to the static variables.