Added generalizable zoom and mouse-grab functionality.