Simplify zooming code