merged refactoring of rotated label feature from maxfranz