Improving modularity for watchmen

Watchmen should be usable both as a command line tool and as a module in a larger project.
This pull request inches towards the modular use case.

* changing all const and let variable declarations to var for compatability
* exposing inputs and outputs on module for programmatic use