trying something dodgy to block out the page till all the script have loaded
trying ot AJAX issue solutions in button.js. Moved all class add stuff to a function