ITTE-1164 Finished client unit test

- Started server unit test (test is broken)
- Fixed other minor bugs