Bring tools test to 100% coverage

* add more tests for the tools package so that it's back to 100% of passing tests
* reident some part
* remove leftover debug print