Reorganize client logic into respective ns