fix client
fix server
Add design docs.