created javascripts dir and moved code there