Merged server code