RPC server changes
rpc server now serves both json and gob, refactored server code into
it's own type