Refacotr cleanUp method

* move clean up task to separate helper class
* now uses less DI
* fixes #258