Enable scaling both subject and query axes.
Reorganize scaling code.
Allow panning either axis.