Split client/server code