Client: more code cleanup.