Regroup all AJAX.registerOnload() and AJAX.registerTeardown() sections at top of file