Improved rotation logic: changed Rotation class into an enum