Refactored out a bit of stuff from ClientBase to ClientTypeMapper.