Moved functions:
• Rotate has been moved back to main to fix error.