made the scala client more like a library

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>