move client definition
fix url prefix finding