If you send a Toolscript export and JSON export of your app to us at multipage-team@retool.com we can help clean it up!
Also I'd recommend following the docs if you want to share component values from a page to global scope. In particular you could use a global variable.