I haven't known much about quaternions yet, but it seems that something is wrong with your rotation matrix multiplication:
ball_new = ball_old * ball;
ball_old = ball;
ball_new = ball * ball_old;
ball_old = ball_new; ?
Since we are concatenating the newly constructed rotation to the accumulated rotation so far.
(Seems ball_new is the accumulative rotation matrix)