Extract formatters into separate js file