clean up code and put all content to js files;