initial refactoring
add init js
merge