updated custom script files to use same pattern as SP

SP uses the pattern where at the bottom of the file it notifies the script loading subsystem that the script has loaded in case any functions needed to be called once a script was loaded. This request modifies a handful of JS files that had this process at the top of the file to the bottom.