Format dictionary
Refactoring