Move rotateDiv to a more appropriate place
Minor: name constants
Minor: Move code around a little
Remove unused function