Update npm
Refactor codes