Updated supporting JS files and fixed debug bug