Solved the issue with the script tag in the markup file for a module and delete is working for templates and when you add a module the page reloads, this means we include the js for the modules only once at the end using ajax. There is one snag and that is if the module does not have a scrip.js file it will 404 but this is better than massive errors! GF