fixed a bug for npm install
small refactorings
removed apt-get update