Wrote better rotation functions. Added test cases for rotations.