Separate javascript from phtml and move javascript and phtml files to public folder