Create JS file and move some files there
Move files into corresponding folders
Fixing all the references