[fix] Pass the formatter as argument so people can re-use the module