Split client and server impl am: a6d6fa3d9d am: 6fc5d41149 am: 438bf99f52

Change-Id: Icccc7001e38bda0fe7fb383c9135fd5aad1bbc5d