Refactored to work as a module and as a commandline application, updated express to version 4x