Eliminate the reliance on global variable for interface orientation.