index.js refactoring.
Service install/uninstall moved to libs.