[Modified] folder structure of javascript, existing javascript code to work with new api structure