Organized code and removed deprecated method in Client