renamed and restructure js files