Improve Server api
Improve test