WebApiService code refectoring