Trying to make an AngleAxis UI

Oops. I accidentally posted this in the wrong forum before. Meant it to go here. 

I want to make a UI control that will, among other things, allow the user to control the orientation of an object using AngleAxis rotations. I thought I understood what I was doing, until I started getting some strange results. So I went back to my earliest version and put in a line to output the values to the listener.

I'm not sure how to do code tags on this forum... 

axis_angle = 0
axisX = 0
axisY = 0
axisZ = 0

if isValidNode $ and ($ != undefined) then

(
  axis_angle = ($.rotation as angleAxis).angle
  axisX = ($.rotation as angleAxis).axis.X
  axisY = ($.rotation as angleAxis).axis.Y
  axisZ = ($.rotation as angleAxis).axis.Z 

  ctrl_AngleAxis.spn_Angle.value = axis_angle
  ctrl_AngleAxis.spn_AxisX.value = axisX
  ctrl_AngleAxis.spn_AxisY.value = axisY
  ctrl_AngleAxis.spn_AxisZ.value = axisZ
)

rollout ctrl_AngleAxis "Test"
(
  spinner spn_Angle "Angle: " scale:1 range:[-360,360,axis_angle]
  spinner spn_AxisX "X: "     scale:.001 range:[-1,1,axisX]
  spinner spn_AxisY "Y: "     scale:.001 range:[-1,1,axisY]
  spinner spn_AxisZ "Z: "     scale:.001 range:[-1,1,axisZ]

  on spn_Angle changed val do
  (
    if isValidNode $ and ($ != undefined) then
    (
      adjust_angle = (ctrl_AngleAxis.spn_Angle.value - axis_angle)
      adjustX = (ctrl_AngleAxis.spn_AxisX.value - axisX)
      adjustY = (ctrl_AngleAxis.spn_AxisY.value - axisY)
      adjustZ = (ctrl_AngleAxis.spn_AxisZ.value - axisZ)

      rotate $ (angleaxis adjust_angle [axisX, axisY, axisZ])

      axis_angle = ctrl_AngleAxis.spn_Angle.value
      axisX = ctrl_AngleAxis.spn_AxisX.value
      axisY = ctrl_AngleAxis.spn_AxisY.value
      axisZ = ctrl_AngleAxis.spn_AxisZ.value

      ctrl_AngleAxis.spn_Angle.value = axis_angle
      ctrl_AngleAxis.spn_AxisX.value = axisX
      ctrl_AngleAxis.spn_AxisY.value = axisY
      ctrl_AngleAxis.spn_AxisZ.value = axisZ

      format "%\n" ($.rotation as angleAxis)
    )
  )
)
createDialog ctrl_AngleAxis width:150 height:100

I had expected that the values output to the listener would correspond to the values displayed in the UI. They start out doing so, but changes made to the X/Y/Z values are not reflected in the listener. Also, changes made to the Angle value cause changes in the X/Y/Z values in the listener output. There also seems to be a tendency for the values to flip between positive and negative (not sure if this is significant or not, as that kind of flipping tends to occur, for example, in the transform type in). However, the fact that they are changing at all puzzles me.

I have already gotten this working properly using Matrix values. The Eulers, Quaternions, and X_/Y_/Z_Rotation versions don't work as well as I would like... but the AngleAxis version is the one I would really like to get working, and the one I am having the most trouble with. I know that if I can get this one working, I can have the other ones licked in no time.

Does anyone have any advice for working with AngleAxis rotations in general? There doesn't really seem to be a lot out there that I could find.