move test tools to main code to make it useable by other applications.