Improved server code example.