Add test support to setup.py
Update tools implementations
Update tests for tools
Some small fixes for tests