Add RequireJS support and update format() support.