various js files refactored.