changed public javascripts structure