refactoring project structure and js"