Add server tests, fix bugs found