Moved all click functions over to using namespaces

This will fix memory leak issues we were having on data tables being reloaded