refactor twitter formatter