Refactor block rotation data handling