Major changes

Change in rotation algorithm COMPLETE MAKEOVER