refactoring for consistent formatting and execution
moving js files