Migrated formatter to its own file. Refactoring.