Splitting server code