refactored required js files