Basic unit tests

* Reworked connection variable in client
* Unit test for server