minor fixes
handling errors on the client side
basic tests