Separated client and server code