*Rotation added

and lots of code cleanup