Separate client and server code