Refactored ClientBaseEx and added the required default constructor.
Make the InstanceContext paramters into a generic parameter.