Removed xpanning and ypanning globals