Deleted unnecessary codes; Handle all rotation events.