Use tree chain instead of pipes + more tests
add http interface