Move format utils from window to being a require.js module