Added testRotate and fixed another double Free