Further client/server refactoring.