Refactoring, move text rendering to own module.