Refactor compile text