move client only code into client package