Refactored to work as node app only (no webapp)

Next: Refactor and full code coverage