Refactoring of javascript namespace / directory structure