Break formatting code to separate file