some fixes to zoom-pan
Cleanup code