refactor into repo class
more tests
fix summary
split output in stdout and stderr