Moved tools from test to lib