Fixed rotate function.  Refactored css classes.