Started refactoring of formatter