fix defined instool
add tests and vagrant support