Panning

Panning feature and some variable declaration fixes