add gemset.
move client server code to lib.