update tests
clean code
add mockserver to tests; more tests
fix #18; add threadpool support