Implement rotations and insert.