Moved server logic to bin