js2-mode is no longer developed and we recommend js-mode these days, so switch the modelines to specify that, and make them consistent across all files. https://bugzilla.gnome.org/show_bug.cgi?id=660358
Rather than returning a modified copy of the input params/defaults, always return a new object, copying the appropriate values into it. https://bugzilla.gnome.org/show_bug.cgi?id=608667