Major redo of rotate_data; replaced all other rotate function calls to rotate_data; be alert\!; minor other changes.