Many rotation and layout fixes