Add client side tests + lot af bugfixes