Restructure of client JS files