move js code to js folder.