Add formatting options to config
Code refactoring