* add some dev dependencies
* decouple code for unit tests