Server refactored; added test with multiple connections