Added support for text rotation, fixed ui internals