Fixed rotations in insertArr, minor changes in rotateLeft and rotateRight