Refactor rotation to seperate class.