Client refactor for #17