refactor specs and Formatter class