Split client and server impl am: a6d6fa3d9d

Change-Id: I50ed5ee15615c9bc47e5d3fada508dc819585401