Refactored client/common.
Refactored for clarity.