Consolidate rotation logic to single function