Refactoring: merge 'textPath' handling into 'text'
Cleaned the code